package dashboard;

public class ForgotPasswordController {

	public ForgotPasswordController()
	{
		
	}
	
	public User getUser(String toCheck)
	{
		if(UserRegistry.getInstance().getUser(toCheck) != null)
			return UserRegistry.getInstance().getUser(toCheck);
		for(User user: UserRegistry.getInstance().getAllUsers())
		{
			if(user.getEmail().equals(toCheck))
				return user;
		}
		return null;
	}
}
